import http from "@/api";

import { CompanyBillingEntity, CompanyBillingVo } from "@/biz/interface/CompanyType";

import { ModuleMainUrl } from "..";
import { ResPage, R } from "@/api/interface";

const moduleUrl = ModuleMainUrl;

export const getCompanyBillingVoListApi = (params: {}) => {
  return http.post<ResPage<CompanyBillingVo>>(moduleUrl + `/cpycoin/billingvolist`, params);
};

export const getCompanyCanBillingChargesListApi = (params: {}) => {
  return http.post<CompanyBillingEntity>(moduleUrl + `/cpycoin/canbillslist`, params);
};

export const getCompanyBillingChargesListApi = (params: {}) => {
  return http.post<R<CompanyBillingEntity[]>>(moduleUrl + `/cpycoin/billslist`, params);
};

export const saveCompanyBillingApi = (company: CompanyBillingEntity) => {
  return http.post(moduleUrl + `/cpycoin/billingsave`, company);
};

export const getCompanyBillingInfoApi = (params: {}) => {
  return http.post<CompanyBillingEntity>(moduleUrl + `/cpycoin/billinginfo`, params);
};

// * 删除招工企业接口
export const deleteCompanyBillingApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/cpycoin/billingdelete`, params);
};
